import { getCategoryAPI } from "@/apis/layout";
import type { Category } from "@/types/layout/layout";
import { defineStore } from "pinia";
import { ref } from "vue";
//导航列表的数据管理
//state 导航列表数据
export const useCategoryStore = defineStore("category", () => {
	const getCategoryList = ref<Category[]>([]);
	//获得导航数据的方法
	const getCategory = async () => {
		const res = await getCategoryAPI();
		getCategoryList.value = res.data.result;
	};
	return {
		getCategoryList,
		getCategory
	}



});
